package com.geccocrawler.gecco.demo.langfang;

import com.geccocrawler.gecco.GeccoEngine;
import com.geccocrawler.gecco.request.HttpGetRequest;
import com.geccocrawler.gecco.spider.JsonBean;

/**
 * Created with IntelliJ IDEA.
 * Description:河北廊坊
 * User: weixiaohu
 * Date: 2019/6/3
 * Time: 11:28
 */
public class SpiderMain implements JsonBean{

    public static void main(String[] args) {
        String hospitalUrl = "http://lfrs.zhiscity.com/Common/GetHospital?pageIndex=1&keyWord=";
        HttpGetRequest start1 = new HttpGetRequest(hospitalUrl);
        start1.setCharset("GBK");
//        String drugStoreUrl = "http://lfrs.zhiscity.com/Common/GetDrugStore?pageIndex=1&keyWord=";
//        HttpGetRequest start2 = new HttpGetRequest(drugStoreUrl);
//        start2.setCharset("GBK");
        GeccoEngine.create()
                .classpath("com.geccocrawler.gecco.demo.langfang")
                .thread(2)
                .interval(2000)
                .start(start1)
                //.start(start2)
                .start();

    }
}
